/*
 *  您可以更改此项目但请不要删除作者署名谢谢，否则根据中华人民共和国版权法进行处理.
 *  You may change this item but please do not remove the author's signature,
 *  otherwise it will be dealt with according to the Copyright Law of the People's Republic of China.
 *
 *  如果需要联系到我请加Wechat: yangbuyiya 备注交流学习
 *  If you need to contact me, please add Wechat: yangbuyiya as a note to exchange and learn.
 *  yangbuyi Copyright (c) https://yby6.com 2024.
 */

package com.yby6.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 多智能体枚举
 * <p>
 * 助理id、用户id、token、名称
 * 后面优化的话可以写个程序登录元器后拉取智能体数据存储到数据库操作
 * </p>
 *
 * @author yangs
 * Create By 2024/06/26
 */
@Getter
@AllArgsConstructor
public enum AgentEnum {
    XIAO_PENG_YOU_DE_GU_SHI_WU(
            "",
            "",
            "",
            "小朋友的故事屋"
    ),
    GE_BI_DA_MA(
            "",
            "",
            "",
            "隔壁大妈"
    ),
    GE_BI_LAO_WANG(
            "",
            "",
            "",
            "隔壁老王"
    );

    private final String assistantId;
    private final String userId;
    private final String token;
    private final String name;
    
    /**
     * 根据助理id获取智能体
     */
    public static AgentEnum getAgent(String assistantId) {
        for (AgentEnum agentEnum : AgentEnum.values()) {
            if (agentEnum.getAssistantId().equals(assistantId)) {
                return agentEnum;
            }
        }
        // 没有找到则使用默认第一个
        return AgentEnum.XIAO_PENG_YOU_DE_GU_SHI_WU;
    }
    
}
